import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/base/order-strategy/index`,
      method: 'post',
      data
    })
  },
  // 日志
  oplog(params) {
    return request({
      url: `/oplog/base.order-strategy`,
      method: 'get',
      params
    })
  },
  // 订单排程与操作策略-启用禁用
  status(data) {
    return request({
      url: `/base/order-strategy/modify-state`,
      method: 'POST',
      data
    })
  },
  // 平台佣金设置-详情
  detail(params) {
    return request({
      url: `/base/order-strategy/detail`,
      method: 'get',
      params
    })
  },
  /**
   * 订单排程与操作策略-获取详情数据
   * @param id
   * @returns {*}
   */
  apiGetOrderStrategy(id) {
    return request({
      url: `/base/order-strategy/${id}`,
      method: 'get',
    })
  },
  //平台佣金设置-编辑
  update(data, id) {
    return request({
      url: `/base/order-strategy/${id}/edit`,
      method: 'POST',
      data
    })
  },
  //平台佣金设置-创建
  create(data) {
    return request({
      url: `/base/order-strategy/create`,
      method: 'POST',
      data
    })
  },
  //平台佣金设置-删除
  delete(id) {
    return request({
      url: `/base/order-strategy/${id}/del`,
      method: 'POST',
    })
  },
  //订单排程与操作策略-获取已执行订单列表
  orderStrategyOrders(data) {
    return request({
      url: `/base/order-strategy/orders`,
      method: 'POST',
      data
    })
  },

}
